import 'dart:convert';

LibraryKnowledgeClassResult libraryKnowledgeClassResultFromJson(String str) =>
    LibraryKnowledgeClassResult.fromJson(json.decode(str));

String libraryKnowledgeClassResultoJson(LibraryKnowledgeClassResult data) =>
    json.encode(data.toJson());

class LibraryKnowledgeClassResult {
  LibraryKnowledgeClassResult({
    this.status,
    this.message,
    this.result,
  });

  int? status;
  String? message;
  LibraryKnowledgeClassData? result;

  factory LibraryKnowledgeClassResult.fromJson(Map<String, dynamic> json) =>
      LibraryKnowledgeClassResult(
        status: json["status"],
        message: json["message"],
        result: LibraryKnowledgeClassData.fromJson(json["result"]),
      );

  Map<String, dynamic> toJson() => {
        "status": status,
        "message": message,
        "result": result?.toJson(),
      };
}

class LibraryKnowledgeClassData {
  LibraryKnowledgeClassData({
    this.studentList,
  });

  List<StudentList>? studentList;

  factory LibraryKnowledgeClassData.fromJson(Map<String, dynamic> json) =>
      LibraryKnowledgeClassData(
        studentList: json["studentList"] != null
            ? List<StudentList>.from(
                json["studentList"].map((x) => StudentList.fromJson(x)))
            : null,
      );

  Map<String, dynamic> toJson() => {
        "studentList": studentList != null
            ? List<dynamic>.from(studentList!.map((x) => x.toJson()))
            : null,
      };
}

class StudentList {
  StudentList({
    this.firstName,
    this.lastName,
    this.total,
    this.grammar,
    this.userName,
    this.word,
  });

  String? firstName;
  String? lastName;
  int? total;
  int? grammar;
  String? userName;
  int? word;

  factory StudentList.fromJson(Map<String, dynamic> json) => StudentList(
        firstName: json["firstName"],
        lastName: json["lastName"],
        total: json["total"],
        grammar: json["grammar"],
        userName: json["userName"],
        word: json["word"],
      );

  Map<String, dynamic> toJson() => {
        "firstName": firstName,
        "lastName": lastName,
        "total": total,
        "grammar": grammar,
        "userName": userName,
        "word": word,
      };
}
